package com.rgs.se.java8new.mylambda.demo;

/**
 * @author Ren Gaoshuai
 * @ClassName TestMain
 * @date 2022-05-01 8:29
 **/
public class TestMain {

    //带方法传进去的参数是一个接口，于是这里出现行为参数化
    public void method1(Apple apple,IApple iApple){

    }

    //注意，这里就是用到匿名内部类，
    public void method2(){
        Apple apple = new Apple();
        method1(apple, new IApple() {
            @Override
            public void test() {

            }
        });
    }

    Thread thread = new Thread(new Runnable() {
        @Override
        public void run() {

        }
    });

}
